exchange=float(input())
dollar=int(input())
while dollar!=-1:
    rmb=dollar*exchange
    print(f'{dollar:.2f}','dollar is',f'{rmb:.2f}','yuan')
    dollar=int(input())
print('-'*20)
rmb=int(input())
while rmb!=-1:
    dollar=rmb/exchange
    print(f'{rmb:.2f}','yuan is',f'{dollar:.2f}','dollar')
    rmb=int(input())
